package com.job.Gai_Yian.Homework0711;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-12 12:56:32
 */
public class TextCup {
    public static void main(String[] args) {
        Cup cup = new Cup("Triipper",49D,380D,"黄色");
        System.out.println(cup);
        //一般的toString方法应该重写为简单易懂的描述对象特征的字符串
        Cup cup2 = new Cup("Triipper",49D,380D,"黄色");
        System.out.println(cup==cup2);              //比较地址
        System.out.println(cup.equals(cup2));       //原始的：比较地址
        //一般的equals重写为比较对象间的所有特征
    }
}
